<%@ page import="ro.gateway.aida.charts.ChartWizzard$ActionForm"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<% ChartWizzard$ActionForm form = (ChartWizzard$ActionForm) session.getAttribute("chartzform");%>
<trans:initPage module="charts" />
<table align="center" width="50%" cellspacing="1" cellpadding="4"
 border="0" background=<html:rewrite page="/images/pixelbgtable.gif"/> class="text_search">
<html:form action="/charts/wizzard">
	<html:hidden property="page" value="2" />
	<html:hidden property="jumppage" value="" />
	<tr bgcolor="#FFFFFF">
		<td style="padding:10px;"><trans:showPageMessage label="chart.wizz.title"/></td>
	</tr>
	<tr bgcolor="#FFFFFF">
		<td style="padding:1px;"><trans:showPageMessage label="chart.wizz.step3.title"/></td>
	</tr>
	<tr bgcolor="#FFFFFF">
		<td>
		X Axe (Sort by):<br/>
		<html:select property="x_axe_criteria">
		<% String[][] categories = ChartWizzard$ActionForm.getCategoryKeys(); %>
		<% for (int i = 0; i < categories.length; i++) { %>
		<% if ("date".equals(categories[i][1])) { %>
			<% if ("time".equals(form.chart_type)) { %>
			<option <%=categories[i][0].equals(form.x_axe_criteria) ? "selected=\"true\"" : ""%> value="<%=categories[i][0]%>"><trans:showPageMessage label='<%=categories[i][0]%>' hide_link="true" /></option>
			<% } else { %>
			<option <%=("year#" + categories[i][0]).equals(form.x_axe_criteria) ? "selected=\"true\"" : ""%> value="<%="year#" + categories[i][0]%>"><trans:showPageMessage label='<%="year#" + categories[i][0]%>' hide_link="true" /></option>
			<% } %>
		<% } else { %>
			<% if (!"time".equals(form.chart_type)) { %>
			<option <%=categories[i][0].equals(form.x_axe_criteria) ? "selected=\"true\"" : ""%> value="<%=categories[i][0]%>"><trans:showPageMessage label='<%=categories[i][0]%>' hide_link="true" /></option>
			<% } %>
		<% } %>
		<% } %>
		</html:select>
		<trans:showPageMessage label="translator.showhiddentags"/>
		</td>
	</tr>
	<tr bgcolor="#FFFFFF">
		<td aling="center">
		<input class=buton type="button" name="x1"
			value="<trans:showPageMessage label="chart.wizz.back" hide_link="true" />"
			onclick="javascript:this.form.jumppage.value='1';this.form.submit();"
			/>
		<input class=buton type="button" name="x1"
			value="<trans:showPageMessage label='<%=form.chart_type.startsWith("bar") ? "chart.wizz.next" : "chart.wizz.chart"%>' hide_link="true" />"
			onclick="javascript:this.form.submit();"
			/>
		</td>
	</tr>
</html:form>
</table>
<trans:showPageMessage label="translator.showhiddentags"/>
